const Router = require('@koa/router')
const { server } = require('../env')
const { verifyStadium, verifyKeyword } = require('../middleware/stadium.middlewre')
const stadiumController = require('../controller/stadium.controller')

const stadiumRouter = new Router({ prefix: `${server.pathPrefix}/stadium` })

stadiumRouter.get('/detail/:id', verifyStadium, stadiumController.detail) // 获取场馆具体信息
stadiumRouter.get('/list', verifyKeyword, stadiumController.list) // 获取场馆列表
stadiumRouter.get('/codes', stadiumController.codes)// 获取所有场馆二维码

module.exports = stadiumRouter